Base graphics
/File/en/Outdated content.png
Out of Date
This article or section is outdated. Some of its content may no longer be accurate due to changes in the latest release. Please update this article.

Base graphics are a set of graphic files that OpenTTD requires to be a game.

Contents

Available base graphics sets

There are two types of base graphics sets: the TTD base graphics and alternative base graphics sets. Ever since OpenTTD was created, it used Transport Tycoon's graphics. Since svn r14197 the game has the ability to load base graphics sets other than the ones from TTD. The first stable release with this ability is OpenTTD 0.7.0.

TTD base graphics

The TTD base graphics set refer to the original graphics of Transport Tycoon Deluxe and comes in two flavours: the Windows and the DOS version. The Windows version obviously originates from the Windows version of TTD; the DOS version from the DOS version of TTD. It doesn't matter which operating system you're running, both versions will work regardless of their names: the TTD DOS base graphics work on a Windows system just as well as the TTD Windows base graphics work on a Mac or Linux.

original_windows

The Original Transport Tycoon Deluxe Windows edition base graphics set consists out of the following files:

original_dos

The Original Transport Tycoon Deluxe DOS edition base graphics set consists out of the following files:

Trivia: The toyland grf file (trgt.grf) of the German TTD DOS CD contains one broken sprite. Therefore an extra obg-file (orig_dos_de.obg) is distributed with OpenTTD.

Alternative base graphics

As of August 31st 2008, OpenTTD can load base graphics sets other than the ones from TTD.

List of alternative base graphics

There are multiple alternative base graphics sets, including:

Installing a base graphics set

Alternative base graphics sets are usually distributed as (file format) tar files. The only thing you have to do to install a base graphics set is to place it in the OpenTTD /data directory. Your OpenTTD data directory is either located in:

TTD base graphics sets are not tarred. If you have one flavour of TTD base graphics set installed, there's absolutely no point in installing the other flavour of TTD base graphics set, as they will look the same. If you haven't installed a TTD base graphics set while installing OpenTTD and you want to install it afterwards, just copy the files listed above (the ones that are not distributed with OpenTTD that is) to the OpenTTD /data directory.

Switching between base graphics sets

Only one base graphics set can be active at any time. If you have multiple base graphics sets installed, there are several ways to switch between them.

Ingame selection

One way to switch between base graphics sets is using the ingame feature.

Editing the config file

Another way to switch between base graphics sets is to edit the config file.

graphicsset = name_of_base_graphics_set

The name of the base graphics set is listed in it's obg-file and may or may not be identical to the obg's file name.

Example

Starting OpenTTD from the command line

The third way to select a certain base graphics set is starting the game from the commandline, adding a parameter option.

openttd -I name_of_base_graphics_set

The name of the base graphics set is listed in it's obg-file and may or may not be identical to the obg's file name.

Creating a base graphics set

Apart from the actual drawing and aligning of Sprites, creating a base graphics set that can be used by OpenTTD is fairly easy. A base graphics set consist of the following files:

It's useful to pack all files of a base graphics set as a tar file. This keeps all files from one base graphics set neatly together. OpenTTD can read tar files, so there's no need for the user to extract it.

The .grf files

The .obg file

The .obg file is what links all .grf files together and is essentially the base of a base graphics set. The .obg file is a plain text file and has the following format (example taken from orig_win.obg):

[metadata]
name         = original_windows
shortname    = TTDW
version      = 0
description  = Original Transport Tycoon Deluxe Windows edition graphics
palette      = Windows

[files]
base         = TRG1R.GRF
logos        = TRGIR.GRF
arctic       = TRGCR.GRF
tropical     = TRGHR.GRF
toyland      = TRGTR.GRF
extra        = OPENTTDW.GRF

[md5s]
TRG1R.GRF    = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF    = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF    = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF    = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF    = de53650517fe661ceaa3138c6edb0eb8
OPENTTDW.GRF = b6689105405fa3ea34cb8a5543633d29

[origin]
default      = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTDW.GRF = This file was part of your installation.

[metadata]

Translations of description can be provided. Add lines in the format "description.<isocode> = <your translation here>", for example:

description.en_GB = "Description translated to British English."

Language isocodes and their equivalent NewGRF language IDs can be found here: [[1]]

[files]

A list of the six different grf file features together with the file names of the six .grf files in the base graphics set.

[md5s]

A list of the exact same filenames as per [files] together with their MD5 hashes. The MD5 hash is not (always) the same as the MD5 hash of the .grf files and should be taken from .grf file-specific tools: `grfid -m` for an existing .grf, or the output of `nmlc --md5=[file]` when making a .grf file from .nml.

[origin]

A list of the exact same filenames as per [files] together with an error message text that is shown if one of the .grf files from the base graphics set is missing or corrupted. You can only specify default if you want the error text to be the same for all files, and/or list each file with a specific error text.

tar archive

The .grf files and the .obg file can be put into a directory and packaged into a .tar archive.

You can also include readme.txt, changelog.txt and license.txt files in the directory within the .tar archive. They will be viewable in-game.